//
// Created by alexa on 5/2/2024.
//

#include "CombatUnit.h"

string CombatUnit::getCrewId() const {
    return crewId;
}

void CombatUnit::setCrewId(string crewId) {
    this->crewId = crewId;
}

const string &CombatUnit::getMissileId() const {
    return missileId;
}

void CombatUnit::setMissileId(string missileId) {
    this->missileId = missileId;
}

const vector<Specialization> &CombatUnit::getRequiredSpecializations() const {
    return requiredSpecializations;
}

void CombatUnit::setRequiredSpecializations(const vector<Specialization> &requiredSpecializations) {
    this->requiredSpecializations = requiredSpecializations;
}

CombatUnit::CombatUnit(const string &name) : name(name) {}

const string &CombatUnit::getName() const {
    return name;
}

float CombatUnit::getPosX() const {
    return posX;
}

void CombatUnit::setPosX(float posX) {
    this->posX = posX;
}

float CombatUnit::getPosY() const {
    return posY;
}

void CombatUnit::setPosY(float posY) {
    this->posY = posY;
}

float calculateDistance(float fromX, float fromY, float toX, float toY) {
    return powf(powf(toX - fromX, 2) + powf(toY - fromY, 2), 0.5);
}

